<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div>
    <button onclick="doBuy()">buy</button>
    <span id="result"></span>
    </div>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script>
        async function doBuy() {
            let span=document.getElementById("result");
            let url="http://localhost:9000/nacos/provider/echo/1";
            axios.get(url)
                    .then(function (result) {
                        console.log("then:{}",result);
                        span.innerHTML=result.data;
                    })
                    .catch(function (error) {
                        console.log("catch:{}",error);
                        if (error.response.status==429){
                            span.innerHTML=error.response.statusText;
                        }
                    })

        }
    </script>
</body>
</html>